{extend name="public/base" /}
{block name="container"}
<div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
{if condition="$Request.action eq 'updateyeji'"}
      修改业绩指标
     {else /} 
      添加业绩指标
{/if}
    </h4>
  </div>
  <div class="panel-body panel-body-nopadding">

    <form class="form-horizontal form-bordered" id="submitForm" action="" method="post" >
        <div class="form-group">
            <label class="col-sm-3 control-label"><span>*</span>指标金额：</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" placeholder="请输入金额" name="money" value="{$data.money ?? ''}"  required>
            </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">所选店铺：</label>
          <div class="col-sm-6">
            <select class="form-control" name="shopid"  required>
                    <option value="-1"> --请选择店铺-- </option>
                    {volist name="shop" id="vo"}
                          <option value="{$vo.id}">{$vo.title}</option>
                    {/volist}      
            </select>
          </div>
        </div>
    <div class="panel-footer">
       <div class="row">
          <div class="col-sm-6 col-sm-offset-3">
            <input type="hidden" name="id" value="{$data.id ?? ''}">
            <button type="submit" class="btn btn-primary">提交</button>
            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);">返回</button>
        </div>
    </div>
</div><!-- panel-footer -->

</form>

</div><!-- panel-body -->
{/block}
{block name="js"}
  <script>
    $(document).ready(function() {
      $("[name='shopid']").find("[value='{$data.shopid ?? '-1'}']").attr("selected", true);
    });
  </script>
{/block}